import 'package:flutter/material.dart';
import 'package:flutter_1/utils/screen_size.dart';

/// 订单按钮
class OlderBtn {
  static Widget olderBtn(
      IconData icon, String txt, Color bgcolor, Color txtcolor, Function fun) {
    return GestureDetector(
      onTap: () {
        fun();
      },
      child: Container(
          margin: const EdgeInsets.symmetric(horizontal: 5),
          padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5),
          decoration: BoxDecoration(
              color: bgcolor, borderRadius: BorderRadius.circular(5)),
          child: Row(
            children: [
              Icon(
                icon,
                color: txtcolor,
              ),
              ScreenSize.width(3),
              Text(
                txt,
                style: TextStyle(color: txtcolor, fontSize: 13),
              ),
            ],
          )),
    );
  }
}
